package com.cqw.mapper.one;


import com.cqw.domain.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {

    int deleteByPrimaryKey(Long userId);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long userId);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser selectByName(String userName);

    /**
     * 查询用户权限
     *
     * @param userId
     * @return
     */
    List<String> selectAuthByUserId(Long userId);

    /**
     * 锁定用户
     *
     * @param userName
     * @return
     */
    int updateStateByUserName(@Param("state") Integer state, @Param("userName") String userName);
}